package com.sport.members.service.impl;

import java.util.List;
import com.sport.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sport.members.mapper.SportMembersMapper;
import com.sport.members.domain.SportMembers;
import com.sport.members.service.ISportMembersService;

/**
 * 会员管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-07
 */
@Service
public class SportMembersServiceImpl implements ISportMembersService 
{
    @Autowired
    private SportMembersMapper sportMembersMapper;

    /**
     * 查询会员管理
     * 
     * @param id 会员管理主键
     * @return 会员管理
     */
    @Override
    public SportMembers selectSportMembersById(Long id)
    {
        return sportMembersMapper.selectSportMembersById(id);
    }

    /**
     * 查询会员管理列表
     * 
     * @param sportMembers 会员管理
     * @return 会员管理
     */
    @Override
    public List<SportMembers> selectSportMembersList(SportMembers sportMembers)
    {
        return sportMembersMapper.selectSportMembersList(sportMembers);
    }

    /**
     * 新增会员管理
     * 
     * @param sportMembers 会员管理
     * @return 结果
     */
    @Override
    public int insertSportMembers(SportMembers sportMembers)
    {
        sportMembers.setCreateTime(DateUtils.getNowDate());
        return sportMembersMapper.insertSportMembers(sportMembers);
    }

    /**
     * 修改会员管理
     * 
     * @param sportMembers 会员管理
     * @return 结果
     */
    @Override
    public int updateSportMembers(SportMembers sportMembers)
    {
        sportMembers.setUpdateTime(DateUtils.getNowDate());
        return sportMembersMapper.updateSportMembers(sportMembers);
    }

    /**
     * 批量删除会员管理
     * 
     * @param ids 需要删除的会员管理主键
     * @return 结果
     */
    @Override
    public int deleteSportMembersByIds(Long[] ids)
    {
        return sportMembersMapper.deleteSportMembersByIds(ids);
    }

    /**
     * 删除会员管理信息
     * 
     * @param id 会员管理主键
     * @return 结果
     */
    @Override
    public int deleteSportMembersById(Long id)
    {
        return sportMembersMapper.deleteSportMembersById(id);
    }
}
